import request from '@/utils/request'

// 登记预约  获取医生
export function getDoctorList() {
  return request({
    url: '/appointment/appointment/getDoctorList',
    method: 'get'
  })
}

// 根据医生拿到该医生下的手术
export function getSurgeryList(query) {
  return request({
    url: '/appointment/appointment/getSurgeryList',
    method: 'get',
    params: query
  })
}

// 术前确认列表
export function pageList(query, current, pageSize) {
  return request({
    url: '/beforeOptConfirm/page/' + current + '/' + pageSize,
    method: 'get',
    params: query
  })
}

// 术前确认
export function saveSurgery(data) {
  return request({
    url: '/beforeOptConfirm/save',
    method: 'post',
    data: data
  })
}

// 根据预约id获取一条术前确认信息
export function read(id, query) {
  return request({
    url: '/beforeOptConfirm/read/' + id,
    method: 'get',
    params: query
  })
}

// 根据预约id获取一条术前确认信息(附加信息)
export function readWithAddOn(id, query) {
  return request({
    url: '/beforeOptConfirm/readWithAddOn/' + id,
    method: 'get',
    params: query
  })
}
